<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        console.log(bar);
        console.log(bar())
        var bar = 456;
        function bar(){
            console.log(1);
        }

        //js执行步骤
        // 函数提升，函数提升优先级高于变量提升
        // var bar = function () {
        //     console.log(1)
        // }
        // 变量提升，不会覆盖同名函数提升，只有变量再次赋值时才会被覆盖
        // var bar;
        // console.log(bar);
        // console.log(bar());
        // bar = 456;
    </script>
</body>
</html>